import 'package:flutter/material.dart';
import 'package:Smart/utils/routers/page_jump_service.dart';
import 'study_middle_swiper.dart';

class StudyMiddlePage extends StatefulWidget {
  StudyMiddlePage({Key key}) : super(key: key);

  @override
  _StudyMiddlePageState createState() => _StudyMiddlePageState();
}

class _StudyMiddlePageState extends State<StudyMiddlePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('功能案例'),
      ),
      body: Container(
        padding: EdgeInsets.all(20),
        child: ListView(
          children: <Widget>[
            GestureDetector(
              onTap: () {
                PageJumpService.instance().goTo(SwiperPage());
              },
              child: Container(
                color: Colors.white,
                padding: EdgeInsets.symmetric(vertical: 5),
                child: Row(
                  children: <Widget>[
                    Expanded(
                      flex: 5,
                      child: Column(
                        mainAxisAlignment: MainAxisAlignment.start,
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: <Widget>[
                          Container(
                            padding: EdgeInsets.only(left: 15),
                            child: Text(
                              '轮播图案例',
                              style: TextStyle(
                                fontSize: 18,
                              ),
                              textAlign: TextAlign.justify,
                            ),
                          ),
                          Container(
                            padding: EdgeInsets.only(left: 15),
                            child: Text(
                              'Swiper组件的使用',
                              style: TextStyle(fontSize: 14),
                              textAlign: TextAlign.justify,
                            ),
                          )
                        ],
                      ),
                    ),
                    Expanded(
                        flex: 1,
                        child: Icon(
                          Icons.navigate_next,
                        )),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
